<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增好物推文')" />
    <style>
        .edui-button.edui-for-135editor .edui-button-wrap .edui-button-body .edui-icon{
            background-image: url("http://static.135editor.com/img/icons/editor-135-icon.png") !important;
            background-size: 85%;
            background-position: center;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-goodsarticle-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">标题：</label>
                <div class="col-sm-8">
                    <input name="title" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">小程序地址：</label>
                <div class="col-sm-8">
                    <input name="minappUrl" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">分享地址：</label>
                <div class="col-sm-8">
                    <input name="shareUrl" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">内容：</label>
                <div class="col-sm-8">
                    <script id="container" name="content" style="width:360px;height:420px;"  type="text/plain"></script>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: ueditor-js" />
    <script type="text/javascript">
        var prefix = ctx + "poem/goodsarticle"
        $("#form-goodsarticle-add").validate({
            focusCleanup: true
        });

        var ue = UE.getEditor('container',{
            initialFrameHeight:600,
            focus:true,
            toolbars:[
            ['bold','italic', 'underline', 'fontborder', 'strikethrough',  '135editor','rowspacingtop', 'rowspacingbottom', 'lineheight','removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','superscript', 'subscript', 'link' ]],
            focusInEnd:true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-goodsarticle-add').serialize());
            }
        }
    </script>
</body>
</html>